package com.witframework.plugin.lucene.index;

import org.apache.lucene.document.Document;

import com.witframework.plugin.lucene.IndexException;


/** 索引生成和维护程序
 * 
 * 
 * 
 * 
 * 
 * @pdOid 7dc0b156-4dd6-4496-9b26-a85bfdc758d3 */
public interface ResourceProcessor {
   /**   为Document生成索引
    * 
    * @param doc
    * @pdOid 3e1262bd-56d8-48ff-bf47-ba117acaad7c */
   void addDocument(Document doc) throws IndexException;
   /** 设置索引存放目录
    * 
    * @param indexDir
    * @pdOid 3b91cf62-ab92-49da-a4df-9df1f38a7bd4 */
   void setIndexDirectory(String indexDir) throws IndexException;
   
   void flush() throws IndexException;
   
   void close() throws IndexException;

}